/* Changes:
   Break marker "//+========" before each section
   Function header added
   More whitespace before+after #ifdef/#endif
   Better indentation for #if/#end directives and wrapped code
   Space before ";" on the end of function prototypes
   Clarifying comments on #endif directives
   Added CR to EOF to stop compiler warnings
*/
/******************************************************************************
*	configuration.c
*	 by Alex Chadwick
*
*	A light weight implementation of the USB protocol stack fit for a simple
*	driver.
*
*	configuration.c contains code to load all components. In order to
*	allow the actual source files to be completely independent, one file must
*	exist which depends upon all of them, to perform static initialisation.
*	Each separate 'library' provides a Load method, which ConfigurationLoad
*	simply invoeks all of.
******************************************************************************/

#include <usbd/device.h>
#include <usbd/descriptors.h>

//==============================================================================
// Add load methods for new modules wrapped in ifdefs here:
void  UsbLoad (void) ;
void  PlatformLoad (void) ;

#ifdef LIB_ARM_V6
	void  Arm6Load (void) ;
#endif // LIB_ARM_V6

#ifdef LIB_BCM2835
	void  Bcm2835Load (void) ;
#endif // LIB_BCM2835

#ifdef LIB_DWC
	void  DwcLoad (void) ;
#endif // LIB_DWC

#ifdef LIB_HID
	void  HidLoad (void) ;
#endif // LIB_HID

#ifdef LIB_HUB
	void  HubLoad (void) ;
#endif // LIB_HUB

#ifdef LIB_KBD
	void  KbdLoad (void) ;
#endif // LIB_KBD

//+=============================================================================
// Func: ConfigurationLoad
// Pram: void
// Retn: void
// Desc: Load each of the required libraries
// Note: Load order is important. Load more generic libraries first
//==============================================================================
void  ConfigurationLoad (void)
{
	PlatformLoad();

#	ifdef LIB_ARM_V6
		Arm6Load();
#	endif // LIB_ARM_V6

#	ifdef LIB_BCM2835
		Bcm2835Load();
#	endif // LIB_BCM2835

	UsbLoad();

#	ifdef LIB_DWC
		DwcLoad();
#	endif // LIB_DWC

#	ifdef LIB_HID
		HidLoad();
#	endif // LIB_HID

#	ifdef LIB_HUB
		HubLoad();
#	endif // LIB_HUB

#	ifdef LIB_KBD
		KbdLoad();
#	endif // LIB_KBD
}
